package com.javacoo.sftp.client.util;

/**
 * 字符串工具类
 * <li></li>
 *
 * @author: duanyong@javacoo.com
 * @since: 2020/5/14 10:12
 */
public class StringUtil {
    public static final String EMPTY = "";
    /**
     * 是否为空判断
     * <li></li>
     * @author duanyong@javacoo.com
     * @date 2020/5/14 10:14
     * @param str:字符串
     * @return: boolean
     */
    public static boolean isBlank(String str) {
        if (str == null) {
            return true;
        } else {
            int len = str.length();

            for(int i = 0; i < len; ++i) {
                if (!Character.isWhitespace(str.codePointAt(i))) {
                    return false;
                }
            }

            return true;
        }
    }
}
